﻿using System;
using System.Collections.Generic;
using Model.AuthModel;
using Model.Base;
namespace IDAL.AuthModel
{
    /// <summary>
    /// 通用组件，权限模型，接口层，管理成员
    /// </summary>
    public interface IStaff
    {
        /// <summary>
        /// 新增成员
        /// </summary>
        /// <param name="info">成员对象</param>
        /// <param name="message">添加结果</param>
        /// <returns></returns>
        int InsertStaff(StaffInfo info, out string message);

        /// <summary>
        /// 修改成员对象
        /// </summary>
        /// <param name="info">成员对象</param>
        /// <returns></returns>
        bool UpdateStaff(StaffInfo info, out string message);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="staffID"></param>
        /// <returns></returns>
        bool DeleteStaff(int staffID);

        /// <summary>
        /// 根据编号获取成员
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns></returns>
        StaffInfo GetStaffByID(int id);

        /// <summary>
        /// 根据成员名获取成员对象
        /// </summary>
        /// <param name="username">成员名</param>
        /// <returns></returns>
        StaffInfo GetStaffByName(string username);

        /// <summary>
        /// 成员列表
        /// </summary>
        /// <param name="condition"></param>
        /// <param name="recordCount">返回记录</param>
        /// <returns></returns>
        IList<StaffInfo> ListStaff(BaseCondition condition, out int recordCount);
    }
}
